#ifndef PLAYER_H
#define PLAYER_H
#include <string>
#include <map>
#include <vector>
#include "EnumType.h"
#include "ResourceSet.h"
#include "DevelopmentCard.h"
#include "SiteCoordinate.h"
#include "PathCoordinate.h"
#include "ConstantType.h"

namespace catan
{

class Player{
public:
	Player();								// default constructor
	Player(std::string theName, color theColor);	// constructor that take the name and the color of the player
	Player(std::string theName, float theRed, float theGreen, float theBlue);
	int getVictoryPoints(bool largestArmy, bool longestRoad);					// accessors
	int getNmbOfRoadsLeft();
	int getNmbOfSettlementsLeft();
	int getNmbOfCitiesLeft();
	int getNmbOfRoadsPlaced();
	int getNmbOfSettlementsPlaced();
	int getNmbOfCitiesPlaced();
	ResourceSet getResources();				// get all resource cards
	const std::map<DevelopmentCard, int> &getPrivateDevelopments();		// get all on hold development cards 
	const std::map<DevelopmentCard, int> &getOnTableDevelopments();		// get all on table development cards 
	std::string getName();	// get player's name
	color getColor();
	float getRed();
	float getGreen();
	float getBlue();
	void setVictoryPoints(int theNumber);	// mutators
	//road information
	void addRoad(PathCoordinate pathCoordinate);
	std::vector<PathCoordinate> getRoads();
	//settlement information
	void addSettlement(SiteCoordinate siteCoordinate);
	std::vector<SiteCoordinate> getSettlements();					//get list of settlements
	//city information
	void upgradeSettlement(SiteCoordinate siteCoordinate);
	std::vector<SiteCoordinate> getCities();						//get city
	//resources
	void setResources(ResourceSet availableResources);
	//development cards
	void addDevelopmentCard(DevelopmentCard developmentCard);	// modify the number of development cards
	void playDevelopmentCard(DevelopmentCard developmentCard);	// modify the number of development cards on the table
	bool canPlayDevelopmentCard(DevelopmentCard developmentCard);
	void printPlayer();						// print the attributes of the player
private:
	std::string playerName;				// the player's name
	color playerColor;				// the player's color
	float colorRed;
	float colorGreen;
	float colorBlue;
	int victoryPoints;				// number of victory points
	ResourceSet availableResources;	// the bag of player's resource cards
	std::map<DevelopmentCard, int> privateDevelopments;
	std::map<DevelopmentCard, int> onTableDevelopments;
	int nmbOfRoadsLeft;					// the number of available player's roads, not placed yet on the board
	int nmbOfSettlementsLeft;
	int nmbOfCitiesLeft;
	int nmbOfRoadsPlaced;
	int nmbOfSettlementsPlaced;
	int nmbOfCitiesPlaced;
	std::vector<SiteCoordinate> settlementCoordinates;
	std::vector<SiteCoordinate> cityCoordinates;
	std::vector<PathCoordinate> roadCoordinates;
};

}

#endif